//
//  Person.m
//  DesignModel
//
//  Created by 赵明明 on 2022/1/5.
//

#import "Person.h"

@implementation Person
-(id)initWithNameAddress:(NSString * )name :(NSString *)address{
    if(self==[super init]){
        _name=name;
        _address=address;
    }
    return self;
}
// 重写这个类，实现copy构造函数
-(id)copyWithZone:(NSZone *)zone{
    Person * pre = [[[self class]allocWithZone:zone] initWithNameAddress:_name :_address ];
    return pre;
}
 
@end
